Skip to content

feat: epoch-zero SDK helpers (getCurrentEpoch, isValidatorBelowMinStake) - #194

Merged
MuncleUscles merged 2 commits into
v2-devfrom
feat/epoch-helpers
Jul 7, 2026
Merged

MuncleUscles merged 2 commits into
v2-devfrom
feat/epoch-helpers

Conversation

@MuncleUscles

Copy link
Copy Markdown
Member

Two additive read-only staking helpers for epoch-0-aware tooling (CLI/explorer/agents), from the epoch-zero assessment:

  • getCurrentEpoch() — current epoch number (epoch 0 = bootstrap, min stake unenforced)
  • isValidatorBelowMinStake(validator) — vStake < validatorMinStake, so callers can render a below-min validator as bootstrapping rather than faulted while epoch is 0

Existing signatures unchanged. 88 tests pass, no type errors. Part of the epoch-zero coverage pass (docs genlayer-docs#431, stories core-mainnet-timeline#33, tooling explorer#449 + cli#357).

Convenience reads for epoch-0-aware tooling: getCurrentEpoch() (bootstrap epoch
where min stake is not enforced) and isValidatorBelowMinStake() so callers can
present a below-min validator as bootstrapping vs faulted while epoch is 0.
Additive; existing signatures unchanged.
@coderabbitai

coderabbitai Bot commented Jul 3, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 5b4a36ad-0fb8-454e-88df-09740e1283f9

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/epoch-helpers

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

getValidatorInfo returns currentEpoch, validatorMinStake,
validatorMinStakeRaw, and belowMin, but the ValidatorInfo interface
was never extended to include them, breaking the dts build
(TS2353) and failing the drift, test, and smoke checks.
@MuncleUscles

Copy link
Copy Markdown
Member Author

/run-e2e tooling

@MuncleUscles
MuncleUscles merged commit a338ad5 into v2-dev Jul 7, 2026
9 of 10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant